#ifndef SAMPLELIBRARYUI_H
#define SAMPLELIBRARYUI_H

#include <QPushButton>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QWidget>

#include "addnewsample.h"
#include "SamplelibraryService.h"
#include "ConfigFileservice.h"
#include "global.h"
#include "custommessagebox.h"
#include "customitemdelegrate.h"

namespace Ui {
class SampleWidget;
}

class SampleWidget : public QDialog
{
    Q_OBJECT

public:
    explicit SampleWidget(QDialog *parent = nullptr);
    ~SampleWidget();

signals:
    void okExport();

public slots:
    void operateSampleLibToDB(AddNewSample::SampleStruct); /* 将新样本传入数据库 */
    void filterSampleTable(); /* 过滤样本库 */
    void reviseSampleTable(int, int); /* 修改样本库 */
    void getDefaultSample(); /* 获取默认染料 */

signals:

private:
    Ui::SampleWidget *ui;
    AddNewSample *addNSam; /* 新建样本窗口 */
    SampleLibrary *SLDB;
    CustomMessageBox *cusMsg;

    void renderSampleInfo(QList<QHash<QString,QString>>); /* 渲染新样本 */


};

#endif // SAMPLELIBRARYUI_H
